﻿using System;
using System.Collections.Generic;
using System.Text;
using Abp.Domain.Entities;
using MySqlX.XDevAPI.Relational;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities.Auditing;
using KelonProud.Administration.Domain.Authorization;

namespace KelonProud.QuickQuery.Domain
{
    [Table("KpQueryGrid")]
   public  class QueryGrid:Entity,ICreationAudited,IMayHaveTenant,IModificationAudited
    {
        public virtual string Name { get; set; }

        public virtual string Code { get; set; }

        public virtual string SelectSql { get; set; }

        public virtual string ExportSql { get; set; }

        public virtual string Description { get; set; }

        public virtual bool IsAutoLoad { get; set; }

        public virtual int? NavigationId { get; set; }

        [ForeignKey("NavigationId")]
        public virtual Navigation Navigation { get; set; }

        public long? CreatorUserId { get; set; }

        [ForeignKey("CreatorUserId")]
        public virtual User CreateUser { get; set; }

        public virtual ICollection<QueryCommand> Commands { get; set; }

        public virtual ICollection<QueryGridColumn> Columns { get; set; }

        public int? TenantId { get; set; }

        public DateTime? LastModificationTime { get; set; }

        public long? LastModifierUserId { get; set; }

        public DateTime CreationTime { get; set; }
    }
}
